Repository navigation
fix(fields): a dependsOn lookup filters by a populated parent's id, not "[object Object]" - #36938
Merged
objectstack-fleet[bot] merged 2 commits intoNov 24, 2026
Merged
Conversation
The dependent-lookup filter stringified a populated parent row into
"[object Object]", so a record page's dependent picker never found options.
It now collapses the parent through the same rule the `{ $record }` filter
comparands already use.
Claude-Session: https://claude.ai/code/session_01QSeKYq2vSKPUSvT9fXdzEY
Co-authored-by: Claude <noreply@anthropic.com>
Contributor
Author
|
repo:objectstack#4 · os-justin · session_01QSeKYpEsWWE9Y5YtSsDgqZ 席位核对 — ACCEPT · L1 · head
|
Contributor
Author
|
repo:objectstack#4 · os-justin · session_01QSeKYpEsWWE9Y5YtSsDgqZ Landing · 2026-11-24T10:43Z · head
|
| Probe | Reading |
|---|---|
check-governed-merges.mjs --pr 36938 |
NOT governed — 87 changed lines |
landing-k.mjs --pr 36938 |
CAN'T ANSWER (no Test Core shard on a UI-only PR); manual: 3 first-parent commits on main since the merge base, no shared book under this PR |
pr-state.mjs --pr 36938 |
44 success · 13 expected skip · 0 failed · 0 pending · mergeable_state clean |
| os-regen drift | 0 — no path on the merge=os-regen list |
State: L1 ACCEPT at this head (above). pr_ready + auto-merge now; the seat follows it to MERGED and closes out #36837 there.
objectstack-fleet
Bot
deleted the
claude/issue-36837-dependson-lookup-id
branch
November 24, 2026 11:16
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #36837
Clause-②: no
Metadata-protocol: none
维护者速读
What changes
A lookup with
dependsOnnaming another lookup builds its candidate filter from the record the host hands it (dependentValues). A record page hands the record as the server returned it, so the parent lookup arrives populated ({ id, name, … }). The one place that turns that record into the filter,LookupField'sdependentFiltermemo, didString(v)on it. The request then carried["crm_account","=","[object Object]"]and the picker never matched.dependentFilternow collapses the parent value throughcollapseReference. That is the rulelookupRecordReference.tsalready applies to{ $record }filter comparands ("an expanded row collapses to its id"), now exported so both candidate-filter readers share it. It is fixed at that one producer. All four candidate surfaces read the same memo, so all four are fixed: the quick-select popover, the Level-2 table picker, the PeoplePicker and the create-new seed (initialValues/ inlinecreate). The fix applies whatever the host is: detail inline edit, header highlight, in-place editor or the record form. A bare-id parent is unchanged.Files:
ui/packages/fields/src/widgets/LookupField.tsx: thedependentFiltermemo collapses each parent value; an import is added.ui/packages/fields/src/widgets/lookupRecordReference.ts:collapseReferenceis exported and its doc names both readers.ui/packages/fields/src/widgets/LookupField.dependsOn.test.tsx: a new top-leveldescribein the existing dependsOn harness..changeset/36837-dependson-lookup-id.md:@object-ui/fieldspatch.Tests
{ account: { id: 'a1', name: 'Acme' } }must put$filter.account === 'a1'on everyfindcall, and the list must show only that account's contact.expected '[object Object]' to be 'a1', the card's captured request reproduced (1 failed | 10 passed).ui/packages/fields/suite passes at e19a6b2: Test Files 326 passed | 1 skipped, Tests 4982 passed | 7 skipped.scripts/ablation-replace.mjs:collapseReference(...)from the memo and landed: anchor 1 → 0, blob c7c449f → 71cd8a0.Received: "[object Object]".git diff HEADis empty../LookupFieldfrom source, so no dist rebuild was needed.Acceptance notes
[object Object]family the card names is in separate code. The kanban grouping (kanban: a board grouped by a lookup or user field draws [object Object] lanes holding every card #36430) and the drill dialog (drill dialog: a relationship-path condition shows as a locked chip reading "= [object Object]" #36507) live inplugin-kanban/plugin-dashboard, and neither readsdependentFilterorcollapseReference. They are not touched here.dependenciesMissing) already treats a populated object as "present", so it needed no change.Verification
First file to read:
LookupField.tsx, thedependentFiltermemo. It is the only risky part of the change.Two-minute check:
pnpm --dir ui exec vitest run packages/fields/src/widgets/LookupField.dependsOn.test.tsxshould show 11 passed.Seat-written open. Seat
repo:objectstack#4(os-justin,session_01QSeKYpEsWWE9Y5YtSsDgqZ) opened this draft on the maintainer's ruling in the seat session, verbatim 「一选1+」 (2026-11-24): option 1+ — the seat performs only the writes the dev session's permission classifier refused, each checked against the branch; pull requests stay draft; no standing allow rule is added (evidence card #36936). Refused once in dev sessionsession_01QSeKYq2vSKPUSvT9fXdzEY, reason[Undermining Oversight]:node scripts/pm/fleet-write/dispatch.mjs --repo objectstack-ai/objectstack --actions-file FILEcarrying this onepr_create. Title and body above are the dev's text, unchanged; branch head checked ate19a6b25(4 files, +84 −3; theLookupField.tsxchange read against the body).Generated by Claude Code